function SetCookie(name, value) {
            var exp = new Date();
            exp.setTime(exp.getTime() + 6 * 24 * 60 * 60 * 1000); //6天过期
            document.cookie = name + "=" + escape(value) + ";path=/;expires=" + exp.toGMTString();
            return true;
        };
function getCookie(name)//utf8中文
{
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
if(arr=document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
}